#ifndef __FILE_MAPPER_H__
#define __FILE_MAPPER_H__

#include "converters.h"

struct file_mapper {
	struct mediafs_decoder_ctx *decoder_ctx;
	struct mediafs_encoder_ctx *encoder_ctx;
	
	struct mediafs_encoder_stat encoder_stat;
	char *header;
	size_t header_size;
};

extern struct file_mapper *file_mapper_open(struct mediafs_decoder_ctx *, struct mediafs_encoder_ctx *);
extern size_t file_mapper_get_mapped_size(struct file_mapper *);
extern int file_mapper_get_mapped_bytes(struct file_mapper *, size_t, size_t, char *_buffer);
extern void file_mapper_close(struct file_mapper *);

#endif

